import request from '@/utils/request'

// 查询产品端口配置列表
export function listPort(query) {
  return request({
    url: '/iot/product/port/list',
    method: 'get',
    params: query
  })
}

// 查询产品端口配置详细
export function getPort(portId) {
  return request({
    url: '/iot/product/port/' + portId,
    method: 'get'
  })
}

// 新增产品端口配置
export function addPort(data) {
  return request({
    url: '/iot/product/port/add',
    method: 'post',
    data: data
  })
}

// 修改产品端口配置
export function updatePort(data) {
  return request({
    url: '/iot/product/port/edit',
    method: 'put',
    data: data
  })
}

// 删除产品端口配置
export function delPort(portId) {
  return request({
    url: '/iot/product/port/' + portId,
    method: 'delete'
  })
}